" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" shut case off
syn case ignore
" Comment
syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString
" Star * (means all spiders)
syn match robotsStar "\*"
" :
syn match robotsDelimiter ":"
" The keywords
" User-agent
syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]"
" Disallow
syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]"
" Disallow: or User-Agent: and the rest of the line before an eventual comment
synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter
" Some frequent things in comments
syn match robotsUrl "http[s]\=://\S*"
syn match robotsMail "\S*@\S*"
syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+
if version >= 508 || !exists("did_robos_syntax_inits")